import { ITodo } from "./typings";

/**
 * 模版：
 */
export function todoView({id, content, completed}: ITodo) {
  return `
    <input type='checkbox' ${completed ? 'checked' : ''} data-id='${id}'/>
    <span style="text-decoration: ${completed ? 'line-through' : 'none'}">${content}</span>
    <button data-id='${id}'>删除</button>
  `
}